package com.chapter0.string;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;


/**
 * String 转换为 ArrayList< String >
 */
public class test2 {
    public static void main(String[] args) {
        String str="1,2,3,4,5";
        ArrayList<String> d = new ArrayList(Arrays.asList(str.split(",")));

        //String  1,2,3,4,5
        System.out.println(str);

        //ArrayList< String >  [1, 2, 3, 4, 5]
        System.out.println(d);

    }
}
